package org.cocos2dx.javascript.admob;

import android.app.Activity;
import android.os.CountDownTimer;
import org.cocos2dx.javascript.admob.*;

public class Ad_Fail_Timer {
    //static Banner mbanner = new Banner();
    //static Interstitial mInterstitial = new Interstitial();
    //static Reward mreward = new Reward();
    public static void reload(final int type, final Activity app){
        CountDownTimer countDownTimer = new CountDownTimer(1000,200) {
            @Override
            public void onTick(long millisUntilFinished) {

            }

            @Override
            public void onFinish() {
                if(type == 1){
                    //banner
                    Banner.InitBunnerAD(app);
                }else if(type ==2){
                    //插页
                    Interstitial.InitInterstitialAD(app);
                }else if(type == 3){
                    //视频
                    Reward.InitrewardedAD(app);
                }else if(type == 4){
                    Interstitial_Reward.loadAd(app);
                }
            }
        };
        countDownTimer.start();
    }
}
